package com.open.capacity.company.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.common.model.SysRecruitment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysRecruitmentDao extends BaseMapper<SysRecruitment> {
    int count(Map<String, Object> params);

//	List<SysUser> findList(Map<String, Object> params);


    List<SysRecruitment> findRecruitment(Map<String, Object> params);

    @Select("select id ,company_id companyId, skills,employee_count employeeCount,exprience,tasks,start_time startTime,end_time endTime,enabled,cost_id costId from crm_recruitment r   where r.id = #{id}")
    SysRecruitment findById(long id);

    int updateByPrimaryKey(SysRecruitment appRecruitment);

    @Select("select id ,company_id companyId, skills,employee_count employeeCount,exprience,tasks,start_time startTime,end_time endTime,enabled,cost_id costId from crm_recruitment r   where r.company_id = #{companyId}")
    SysRecruitment findByRecruitment(Integer companyId);
}
